package NGUYENNGOCMINH.Array.Baitap2;

public class CONTROLLER {
	public static int average (int[] array) {
		int tong = 0;
		for(int i = 0; i < array.length; i++){
			tong = tong + array[i];
		}
		int sum = tong / (array.length);
		return sum;
	}
	
	public static double average (double[] array) {
		double tong = 0;
		for(int i = 0; i < array.length; i++){
			tong = tong + array[i];
		}
		double sum = tong / (array.length);
		return sum;
	}
}
